A hard disk is slower in access as compared to a semiconductor memory. Accordingly, improvement in data access speed is attained by storing cache data to a main memory by using a part of the main memory as a target area for caching.
Also, a hybrid hard disk drive is known, in which a nonvolatile memory is mounted on a hard disk, and the nonvolatile memory is used as a cache memory.
Also, a computer to which an solid-state disk (SSD) which uses a nonvolatile memory as a storage medium is adopted in place of a hard disk drive has recently been marketed.
A system using a main memory and an SSD as caches is currently proposed. In the system, a driver is used for caching to the main memory and the SSD. However, in the case where a crash of an operating system occurs in a state where the caching to the main memory and the SSD is performed by the driver, there is a risk of losing the cached data. Therefore, since there is the risk of losing the cached data which are not written to a storage in the case of the crash of the operating system, there is a demand for a technology for restoring the cached data to the storage.
In order to attain data redundancy, a Redundant Array of Inexpensive Disks (RAID) is used. The RAID can be classified into a hardware RAID to be executed by dedicated hardware and a software RAID with which a CPU performs processing relating to the RAID. In the case of the software RAID, a parity (redundancy code) is calculated by using the main memory. Therefore, in the case where the crash of the operating system occurs before the parity is written to the storage, there is a risk of damaging the redundancy due to a loss of the parity. Accordingly, there is a demand for a technology for restoring the parity to the storage in the case where the crash of the operating system occurs in a state where the parity is not written to the storage.
As explained above, there is a demand for restoring data to a storage even when an operating system crash occurs in a state where the data are not written into the storage.